import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

/** ************************************************************************************************
 ***************************************** 综合业务 ************************************************
 **************************************************************************************************/
// 公共信息查询
import PublicInfo from "@/views/publicInfo/PublicInfo";
import OpenBankInquiry from "@/views/publicInfo/openBankInquiry/openBankInquiry";

// 挂失
import ReportLoss from "@/views/reportLoss/ReportLoss";
import OralLoss from "@/views/reportLoss/lossModule/OralLoss";

// 尊老卡
import respectIndex from "@/views/respectElderly/respectIndex";
import respectQ1 from "@/views/respectElderly/respectProcess";
import respectQ2 from "@/views/respectElderly/respectProcess";

// 个人业务
import Personal from "@/views/personal/Personal";
// import Cheque from "@/views/personal/cheque/cheque";
// import LoanBusiness from "@/views/personal/loanBusiness/LoanBusiness";
// import ShortMessage from "@/views/personal/shortMessage/ShortMessage";
// 公司业务
import Company from "@/views/company/Company";
//录音与工单
// import Orders from "@/views/personal/orders";

//调单管理
import Adjustment from "@/views/adjustment/adjustment";
//面签客户信息
import Faceuserinfo from "@/views/faceuserinfo/faceuserinfo";


import Soundrecording from '@/views/soundrecording/soundrecording.vue'
import Workorder from '@/views/workorder/workorder.vue'

//历史贷款审批记录
import Loanhistory from "@/views/loanhistory/loanhistory";
//历史贷款审批记录
import Ansyertemp from "@/views/answertemplate/ansyertemp";

// 电核结果通知
import dhResultNotice from "@/views/dhResultNotice/index";

// 公用路由组件
import Option from "@/views/data/option";

/** ************************************************************************************************
 ***************************************** 信用卡业务 **********************************************
 **************************************************************************************************/
// 待开发

/** ************************************************************************************************
 ***************************************** 视频业务-小程序 *****************************************
 **************************************************************************************************/
// 银行卡激活
import CardActive from "@/views/videoBiz/xiaochengxu/cardActive/CardActive";
// 不动户恢复
import RealEstateRecovery from "@/views/videoBiz/xiaochengxu/realEstateRecovery/RealEstateRecovery";
// 账户限制解除
import AccRestrictLift from "@/views/videoBiz/xiaochengxu/accRestrictLift/AccRestrictLift";
// 对公开户
import ForOpenHouse from "@/views/videoBiz/xiaochengxu/forOpenHouse/ForOpenHouse";

/** ************************************************************************************************
 ***************************************** 视频业务-手机银行 ***************************************
 **************************************************************************************************/
// 银行卡激活
import PhoneBankCardActive from "@/views/videoBiz/phoneBank/cardActive";
// 对公开户
import PhoneBankForOpenHouse from "@/views/videoBiz/phoneBank/forOpenHouse";
// 理财风险评估
import PhoneBankRiskAssessment from "@/views/videoBiz/phoneBank/riskAssessment";

/** ************************************************************************************************
 ******************************************* 知识库 ************************************************
 **************************************************************************************************/
// 知识库组件
import Kbp from "@/views/kbp/kbp";
import KbpDetail from "@/views/kbp/kbpDetail";

/** ************************************************************************************************
 ***************************************** 智能推荐 ************************************************
 **************************************************************************************************/
// import FaceRecognition from '@/views/faceRecognition/FaceRecognition'

/** ************************************************************************************************
 ***************************************** 智能助手 ************************************************
 **************************************************************************************************/
// import IntelligentAssisTant from '@/views/intelligentAssisTant/IntelligentAssisTant'
/** ************************************************************************************************
 ***************************************** 网页协同 ************************************************
 **************************************************************************************************/
// import WebCollaborative from '@/views/webCollaborative/WebCollaborative'
/** ************************************************************************************************
 ***************************************** 人脸识别 ************************************************
 **************************************************************************************************/
// import FaceRecognition from '@/views/faceRecognition/FaceRecognition'
//***********************************2024-05-14添加湖北消金***********************************
import customerInfo from '@/components/common/customerInfo.vue'
import repayPlan from '@/components/common/repayPlan'
import customerImageView from '@/components/common/customerImageView'
import overPayManage from '@/components/common/overPaymentManage.vue'
import quotaAgreement from '@/components/common/quotaAgreement.vue'
import settlementCertificate from '@/components/common/settlementCertificate.vue'
import deductionQuery from '@/components/common/deductionQuery.vue'
import proactiveRepayment from '@/components/common/proactiveRepayment.vue'


export default new Router({
  routes: [
    {
      // 首先进行重定向操作
      path: "/",
      redirect: { name: window.ctpMenuOption.home.redirectName() }
    },
    /** *************************************** 综合业务 ***********************************************/
    // 个人业务
    {
      path: "/personal",
      name: "personal",
      component: Personal,
      meta: {
        keepAlive: true,
        ifDoFresh: false,
        active: "/personal",
        isBack: false
      },
      children: [

        {
          path: "repayPlan",
          name: "repayPlan",
          component: repayPlan,
          meta: {
            aliasName: "还款信息查询",
            keepAlive: true,
            active: "/personal",
            isBack: true,
            flag: "repayPlan",
            // 是否需要验密
            needAuth: false,
            // 离线是否可操作
            needOnline: true,
            type: ["tabs"]
          }
        },
        {
          path: "customerInfo",
          name: "customerInfo",
          component: customerInfo,
          meta: {
            aliasName: "客户资料查询",
            keepAlive: true,
            active: "/personal",
            isBack: true,
            flag: "customerInfo",
            // 是否需要验密
            needAuth: false,
            // 离线是否可操作
            needOnline: true,
            type: ["tabs"]
          }
        },
        {
          path: "customerImageView",
          name: "customerImageView",
          component: customerImageView,
          meta: {
            aliasName: "客户影像件查看",
            keepAlive: true,
            active: "/personal",
            isBack: true,
            flag: "customerImageView",
            // 是否需要验密
            needAuth: false,
            // 离线是否可操作
            needOnline: true,
            type: ["tabs"]
          }
        },
        {
          path: "overPayManage",
          name: "overPayManage",
          component: overPayManage,
          meta: {
            aliasName: "溢缴款管理",
            keepAlive: true,
            active: "/personal",
            isBack: true,
            flag: "overPayManage",
            // 是否需要验密
            needAuth: false,
            // 离线是否可操作
            needOnline: true,
            type: ["tabs"]
          }
        },
        {
          path: "proactiveRepayment",
          name: "proactiveRepayment",
          component: proactiveRepayment,
          meta: {
            aliasName: "主动还款",
            keepAlive: true,
            active: "/personal",
            isBack: true,
            flag: "proactiveRepayment",
            // 是否需要验密
            needAuth: false,
            // 离线是否可操作
            needOnline: true,
            type: ["tabs"]
          }
        },
        {
          path: "quotaAgreement",
          name: "quotaAgreement",
          component: quotaAgreement,
          meta: {
            aliasName: "额度协议管理",
            keepAlive: true,
            active: "/personal",
            isBack: true,
            flag: "quotaAgreement",
            // 是否需要验密
            needAuth: false,
            // 离线是否可操作
            needOnline: true,
            type: ["tabs"]
          }
        },
        {
          path: "settlementCertificate",
          name: "settlementCertificate",
          component: settlementCertificate,
          meta: {
            aliasName: "结清证明申请",
            keepAlive: true,
            active: "/personal",
            isBack: true,
            flag: "settlementCertificate",
            // 是否需要验密
            needAuth: false,
            // 离线是否可操作
            needOnline: true,
            type: ["tabs"]
          }
        },
        {
          path: "deductionQuery",
          name: "deductionQuery",
          component: deductionQuery,
          meta: {
            aliasName: "实时扣款查询",
            keepAlive: true,
            active: "/personal",
            isBack: true,
            flag: "deductionQuery",
            // 是否需要验密
            needAuth: false,
            // 离线是否可操作
            needOnline: true,
            type: ["tabs"]
          }
        },
     


        // {
        //   path: "accSearch",
        //   name: "accSearch",
        //   component: Option,
        //   meta: {
        //     aliasName: "账户查询",
        //     keepAlive: true,
        //     active: "/personal",
        //     isBack: true,
        //     flag: "accSearch",
        //     // 是否需要验密
        //     needAuth: true,
        //     // 离线是否可操作
        //     needOnline: true,
        //     type: ["tabs"]
        //   }
        // },
        // {
        //   path: "cheque",
        //   name: "cheque",
        //   component: Cheque,
        //   meta: {
        //     aliasName: "签约查询",
        //     keepAlive: true,
        //     active: "/personal",
        //     isBack: true,
        //     flag: "cheque",
        //     // 是否需要验密
        //     needAuth: true,
        //     // 离线是否可操作
        //     needOnline: true,
        //     type: ["default"]
        //   }
        // },
        // {
        //   path: "loanBusiness",
        //   name: "loanBusiness",
        //   component: LoanBusiness,
        //   meta: {
        //     aliasName: "贷款查询",
        //     keepAlive: true,
        //     active: "/personal",
        //     isBack: true,
        //     flag: "loanBusiness",
        //     // 是否需要验密
        //     needAuth: true,
        //     // 离线是否可操作
        //     needOnline: true,
        //     type: ["tabs"]
        //   }
        // },
        // {
        //   path: "messageService",
        //   name: "messageService",
        //   component: Option,
        //   meta: {
        //     aliasName: "短信银行业务",
        //     keepAlive: true,
        //     active: "/personal",
        //     isBack: true,
        //     flag: "messageService",
        //     // 是否需要验密
        //     needAuth: true,
        //     // 离线是否可操作
        //     needOnline: true,
        //     type: ["tabs"]
        //   }
        // },
        // {
        //   path: "passUpdate",
        //   name: "passUpdate",
        //   component: Option,
        //   meta: {
        //     aliasName: "查询密码修改",
        //     keepAlive: true,
        //     active: "/personal",
        //     isBack: true,
        //     flag: "passUpdate",
        //     // 是否需要验密
        //     needAuth: true,
        //     // 离线是否可操作
        //     needOnline: true,
        //     type: ["tabs"]
        //   }
        // },
        // {
        //   path: "personalWealth",
        //   name: "personalWealth",
        //   component: Option,
        //   meta: {
        //     aliasName: "个人理财",
        //     keepAlive: true,
        //     active: "/personal",
        //     isBack: true,
        //     flag: "personalWealth",
        //     // 是否需要验密
        //     needAuth: true,
        //     // 离线是否可操作
        //     needOnline: true,
        //     type: ["tabs"]
        //   }
        // },
        // {
        //   path: "sendShortMessage",
        //   name: "sendShortMessage",
        //   component: ShortMessage,
        //   meta: {
        //     aliasName: "短消息发送",
        //     keepAlive: true,
        //     active: "/personal",
        //     isBack: true,
        //     flag: "sendShortMessage",
        //     // 是否需要验密
        //     needAuth: true,
        //     // 离线是否可操作
        //     needOnline: true,
        //     type: ["tabs"]
        //   }
        // }
      ]
    },
    // 公司业务
    {
      path: "/company",
      name: "company",
      component: Company,
      meta: {
        keepAlive: true,
        ifDoFresh: false,
        active: "/company",
        isBack: false
      },
      children: [
        {
          path: "accInfo",
          name: "accInfo",
          component: Option,
          meta: {
            aliasName: "账户查询",
            keepAlive: true,
            active: "/company",
            isBack: true,
            flag: "accInfo",
            // 是否需要验密
            needAuth: true,
            // 离线是否可操作
            needOnline: true,
            type: ["tabs"]
          }
        }
      ]
    },
    // 公共信息
    {
      path: "/publicInfo",
      name: "publicInfo",
      component: PublicInfo,
      meta: {
        active: "/publicInfo",
        isBack: false,
        keepAlive: true
      },
      children: [
        {
          path: "depositInterestRateInquiry",
          name: "depositInterestRateInquiry",
          component: Option,
          meta: {
            aliasName: "存款利率查询",
            keepAlive: true,
            active: "/publicInfo",
            isBack: true,
            flag: "depositInterestRateInquiry",
            type: ["table"]
          }
        },
        {
          path: "exchangeRateInquiry",
          name: "exchangeRateInquiry",
          component: Option,
          meta: {
            aliasName: "汇率查询",
            keepAlive: true,
            active: "/publicInfo",
            isBack: true,
            flag: "exchangeRateInquiry",
            type: ["table"]
          }
        },
        {
          path: "personalProductSupermarket",
          name: "personalProductSupermarket",
          component: Option,
          meta: {
            aliasName: "个人理财产品",
            keepAlive: true,
            active: "/publicInfo",
            isBack: true,
            flag: "personalProductSupermarket",
            type: ["table"]
          }
        },
        {
          path: "wealthProductSupermarket",
          name: "wealthProductSupermarket",
          component: Option,
          meta: {
            aliasName: "理财产品超市",
            keepAlive: true,
            active: "/publicInfo",
            isBack: true,
            flag: "wealthProductSupermarket",
            type: ["table"]
          }
        },
        {
          path: "loanInterestRateInquiry",
          name: "loanInterestRateInquiry",
          component: Option,
          meta: {
            aliasName: "贷款利率查询",
            keepAlive: true,
            active: "/publicInfo",
            isBack: true,
            flag: "loanInterestRateInquiry",
            type: ["table"]
          }
        },
        {
          path: "openBankInquiry",
          name: "openBankInquiry",
          component: OpenBankInquiry,
          meta: {
            aliasName: "开户行查询",
            keepAlive: true,
            active: "/publicInfo",
            isBack: true,
            flag: "openBankInquiry",
            type: ["table"]
          }
        },
        {
          path: "fundProductSupermarket",
          name: "fundProductSupermarket",
          component: Option,
          meta: {
            aliasName: "基金产品超市",
            keepAlive: true,
            active: "/publicInfo",
            isBack: true,
            flag: "fundProductSupermarket",
            type: ["table"]
          }
        }
      ]
    },
    // 挂失
    {
      path: "/reportLoss",
      name: "reportLoss",
      component: ReportLoss,
      meta: {
        keepAlive: true,
        ifDoFresh: false,
        active: "/reportLoss",
        isBack: false
      },
      children: [
        {
          path: "oralLoss",
          name: "oralLoss",
          component: OralLoss,
          meta: {
            aliasName: "口头挂失",
            keepAlive: true,
            active: "/reportLoss",
            isBack: true,
            flag: "oralLoss",
            type: [""]
          }
        }
      ]
    },
    // 尊老卡
    {
      path: "/respectIndex",
      name: "respectIndex",
      component: respectIndex,
      meta: {
        keepAlive: true,
        ifDoFresh: false,
        active: "/respectIndex",
        isBack: false
      },
      children: [
        {
          path: "respectQ1",
          name: "respectQ1",
          component: respectQ1,
          meta: {
            aliasName: "尊老卡领卡机构查询",
            keepAlive: true,
            active: "/respectIndex",
            isBack: true,
            flag: "respectQ1",
            type: [""]
          }
        },
        {
          path: "respectQ2",
          name: "respectQ2",
          component: respectQ2,
          meta: {
            aliasName: "尊老卡更换机构受理",
            keepAlive: true,
            active: "/respectIndex",
            isBack: true,
            flag: "respectQ2",
            type: [""]
          }
        }
      ]
    },
    //调单管理
    {
      path: "/adjustment",
      name: "adjustment",
      component: Adjustment,
      meta: {
        keepAlive: true,
        ifDoFresh: true,
        active: "/adjustment",
        isBack: false,
        // 是否需要验密
        needAuth: true,
        // 离线是否可操作
        needOnline: false
      },
      children: []
    },
    // 录音历史
    {
      path: "/soundrecording",
      name: "soundrecording",
      component: Soundrecording,
      meta: {
        keepAlive: true,
        ifDoFresh: false,
        active: "/soundrecording",
        isBack: false,
        // 是否需要验密
        needAuth: true,
        // 离线是否可操作
        needOnline: false
      },
      children: []
    },
    // 工单历史
    {
      path: "/workorder",
      name: "workorder",
      component: Workorder,
      meta: {
        keepAlive: true,
        ifDoFresh: false,
        active: "/workorder",
        isBack: false,
        // 是否需要验密
        needAuth: true,
        // 离线是否可操作
        needOnline: false
      },
      children: []
    },

    //面签客户信息
    {
      path: "/faceuserinfo",
      name: "faceuserinfo",
      component: Faceuserinfo,
      meta: {
        keepAlive: true,
        ifDoFresh: false,
        active: "/faceuserinfo",
        isBack: false,
        // 是否需要验密
        needAuth: true,
        // 离线是否可操作
        needOnline: false
      },
      children: []
    },
    //历史贷款审批记录
    {
      path: "/loanhistory",
      name: "loanhistory",
      component: Loanhistory,
      meta: {
        keepAlive: true,
        ifDoFresh: false,
        active: "/loanhistory",
        isBack: false,
        // 是否需要验密
        needAuth: true,
        // 离线是否可操作
        needOnline: false
      },
      children: []
    },
    //答题模板
    {
      path: "/ansyertemp",
      name: "ansyertemp",
      component: Ansyertemp,
      meta: {
        keepAlive: true,
        ifDoFresh: false,
        active: "/ansyertemp",
        isBack: false,
        // 是否需要验密
        needAuth: true,
        // 离线是否可操作
        needOnline: false
      },
      children: []
    },

    /** *************************************** 视频业务 ***********************************************/
    {
      path: "/cardActive",
      name: "cardActive",
      components: {
        videoServices: CardActive
      },
      meta: {
        keepAlive: true,
        active: "/cardActive",
        isBack: false,
        flag: "CardActive"
      }
    },
    {
      path: "/realEstateRecovery",
      name: "realEstateRecovery",
      components: {
        videoServices: RealEstateRecovery
      },
      meta: {
        keepAlive: true,
        active: "/realEstateRecovery",
        isBack: false,
        flag: "RealEstateRecovery"
      }
    },
    {
      path: "/accRestrictLift",
      name: "accRestrictLift",
      components: {
        videoServices: AccRestrictLift
      },
      meta: {
        keepAlive: true,
        active: "/accRestrictLift",
        isBack: false,
        flag: "AccRestrictLift"
      }
    },
    {
      path: "/forOpenHouse",
      name: "forOpenHouse",
      components: {
        videoServices: ForOpenHouse
      },
      meta: {
        keepAlive: true,
        active: "/forOpenHouse",
        isBack: false,
        flag: "ForOpenHouse"
      }
    },
    {
      path: "/phoneBankCardActive",
      name: "phoneBankCardActive",
      components: {
        videoServices: PhoneBankCardActive
      },
      meta: {
        keepAlive: true,
        active: "/phoneBankCardActive",
        isBack: false,
        flag: "phoneBankCardActive"
      }
    },
    {
      path: "/phoneBankForOpenHouse",
      name: "phoneBankForOpenHouse",
      components: {
        videoServices: PhoneBankForOpenHouse
      },
      meta: {
        keepAlive: true,
        active: "/phoneBankForOpenHouse",
        isBack: false,
        flag: "phoneBankForOpenHouse"
      }
    },
    {
      path: "/phoneBankRiskAssessment",
      name: "phoneBankRiskAssessment",
      components: {
        videoServices: PhoneBankRiskAssessment
      },
      meta: {
        keepAlive: true,
        active: "/phoneBankRiskAssessment",
        isBack: false,
        flag: "phoneBankRiskAssessment"
      }
    },
    /** *************************************** 智能助手 ***********************************************/
    {
      path: "/kbp",
      name: "kbp",
      components: {
        kbpRouter: Kbp
      },
      meta: {
        keepAlive: true,
        ifDoFresh: true,
        active: "/kbp",
        isBack: true
      }
    },
    {
      path: "/kbpDetail",
      name: "kbpDetail",
      components: {
        kbpRouter: KbpDetail
      },
      meta: {
        keepAlive: true,
        ifDoFresh: false,
        active: "/kbpDetail",
        isBack: true
      }
    },
    {
      path: "/dhResultNotice",
      name: "dhResultNotice",
      components: {
        dhRouter: dhResultNotice
      },
      meta: {
        keepAlive: true,
        ifDoFresh: false,
        active: "/dhResultNotice",
        isBack: true
      }
    }

    /** *************************************** 智能助手 ***********************************************/
    // {
    //   path: '/intelligentAssisTant',
    //   name: 'intelligentAssisTant',
    //   component: IntelligentAssisTant,
    //   meta: {
    //     keepAlive: true,
    //     ifDoFresh: false,
    //     active: '/intelligentAssisTant',
    //     isBack: true
    //   }
    // },
    /** *************************************** 网页协同 ***********************************************/
    // {
    //   path: '/webCollaborative',
    //   name: 'webCollaborative',
    //   component: WebCollaborative,
    //   meta: {
    //     keepAlive: true,
    //     ifDoFresh: false,
    //     active: '/webCollaborative',
    //     isBack: true
    //   }
    // },
    /** *************************************** 人脸识别 ***********************************************/
    // {
    //   path: '/faceRecognition',
    //   name: 'faceRecognition',
    //   component: FaceRecognition,
    //   meta: {
    //     keepAlive: true,
    //     ifDoFresh: false,
    //     active: '/faceRecognition',
    //     isBack: true
    //   }
    // }
  ]
});
